package com.company.cloud.user.modules.api.service;

import java.util.List;
import java.util.Map;
import java.util.Set;

import com.company.cloud.common.bean.BaseClientResult;
import com.company.cloud.user.modules.api.response.TeamSimpleModel;
import com.company.common.server.constant.ServiceNameConstant;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RequestParam;

import com.company.cloud.user.modules.api.fallback.UserRemoteServiceFallbackFactory;
import com.company.cloud.user.modules.api.response.UserFull;
import com.company.cloud.user.modules.api.response.UserSimple;

@FeignClient(contextId = "user1", name = ServiceNameConstant.user_center, fallbackFactory = UserRemoteServiceFallbackFactory.class)
public interface UserRemoteService {

	
	/***/
	@RequestMapping(value = "/remote/user/fullUserById", method = RequestMethod.GET)
	public BaseClientResult<UserFull> getFullUserById(@RequestParam("id") Integer id);
	
	
	/***/
	@RequestMapping(value = "/remote/user/userById", method = RequestMethod.GET)
	public BaseClientResult<UserSimple> getUserById(@RequestParam("id") Integer id);

	/***/
	@RequestMapping(value = "/remote/user/listByIds1", method = RequestMethod.GET)
	public BaseClientResult<List<UserSimple>> getUserListByIds(@RequestParam("ids") String ids);

	/***/
	@RequestMapping(value = "/remote/user/listByIds2", method = RequestMethod.GET)
	public BaseClientResult<List<UserSimple>> getUserListByIds(@RequestParam("ids") Set<Integer> ids);

	/***/
	@RequestMapping(value = "/remote/user/mapByIds1", method = RequestMethod.GET)
	public BaseClientResult<Map<Integer, UserSimple>> getUserMapByIds(@RequestParam("ids") String ids);

	/***/
	@RequestMapping(value = "/remote/user/mapByIds2", method = RequestMethod.GET)
	public BaseClientResult<Map<Integer, UserSimple>> getUserMapByIds(@RequestParam("ids") Set<Integer> ids);

	/***/
	@RequestMapping(value = "/remote/user/getUserByShareCode", method = RequestMethod.GET)
	public BaseClientResult<UserSimple> getUserByShareCode(@RequestParam("shareCode") String shareCode);

	/***/
	@RequestMapping(value = "/remote/user/getUserByShareCodes", method = RequestMethod.GET)
	public BaseClientResult<Map<Integer, UserSimple>> getUserByShareCodes(@RequestParam("shareCodes") Set<String> shareCodes);

	/***/
	@RequestMapping(value = "/remote/user/getUserByCustCode", method = RequestMethod.GET)
	public BaseClientResult<UserSimple> getUserByCustCode(@RequestParam("custCode") String custCode);

	/***/
	@RequestMapping(value = "/remote/user/getTeamSimpleModel", method = RequestMethod.GET)
	public BaseClientResult<TeamSimpleModel> getTeamSimpleModel(@RequestParam("userId") Integer userId);



}
